<?php
namespace Admin\Controller;
use Admin\Controller\BaseController;
class ScoresController extends BaseController {
	private $tbl;
	public function _initialize(){
		$this->tbl='scores';
		$this->model=D($this->tbl);
		parent::_initialize();
	}
    public function index(){
		parent::index($this->tbl);		
    }
	public function	view(){
		$id=I('get.id');//获取id
	}
	public function delete(){//删除
		parent::delete($this->tbl,"id","pic");
	}
	public function search(){
		$key=I('post.searchname');
		$sql="select * from scores where star like '%".$key."%'
		 or uname like '%".$key."%' or gname like '%".$key."%' or content like '%".$key."%' order by id desc";
		$res=M()->query($sql);
		$this->assign("list",$res);
		$this->display();
	}
}